package cn.tedu.smartos.family_user.mapper;

import cn.tedu.smartos.family_user.pojo.entity.LocationRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface LocationRecordMapper {
    // 获取老人最新位置
    LocationRecord selectLatestByElderlyUserId(Long elderlyUserId);

    // 获取老人位置历史
    List<LocationRecord> selectHistoryByElderlyUserId(
            @Param("elderlyUserId") Long elderlyUserId,
            @Param("limit") Integer limit
    );

    LocationRecord selectLocationRecordById(Long recordId);
    int insertLocationRecord(LocationRecord record);
}